package poo.thread.counter;

import java.util.*;

public class Main {

	public static void main(String[] args) {

		Counter c = new Counter(10);
		User u = new User(0, c, 1000, 5000);
		User u1 = new User(1, c, 3000, 8000);
		User u2 = new User(2, c, 1000, 8000);
		u.start();
		u1.start();
		u2.start();
		try {
			Thread.sleep(3000);

		} catch (InterruptedException e) {

		}
		u.interrupt();
		u1.interrupt();
		u2.interrupt();
		List<Integer> li = new LinkedList();// non thread safe
		List<Integer> lis = Collections.synchronizedList(li); //restituita thread safe,
		
		Iterator <Integer > it = lis.iterator();
		

	}

}
